﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FluentNHibernate.Mapping;
using TaiDouCommon.Model;

namespace TaiDouPhotonServer.DB.Mapping
{
    class RoleMap:ClassMap<Role>
    {
        public RoleMap()  //这里的X是Role的实例
        {
            Id(x => x.Id).Column("Id");////设置id属性为主
            Map(x => x.Name).Column("Name");
            Map(x => x.Level).Column("Level");
            Map(x => x.isMan).Column("isman");

            References(x => x.user).Column("userid");//外键
        }
    }
}
